#include<stdio.h>
#include<stdlib.h>
#include<math.h>

#ifndef _PERMUT_H_
#define _PERMUT_H_

#define RANDOM_INIT() rand()
#define RANDOM(a) (int)((double)rand()/(RAND_MAX+1)*a)

class TPermut {
private:
    int n;
    int c;
    int *Nc;
    int *N;
    int oNc, nNc;
    int SheduleN(void);
public:
    TPermut(int newn = 1);
    ~TPermut(void);
    int Get(void);
    int GetStep(void);
    int ReCreate(int newn, bool first = false);
};

#endif
